<!--首页轮播-->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        {{if !empty($banner_list)}}
        {{foreach $banner_list as $key => $banner}}
        {{if !empty($banner['images_url'])}}
        <li data-target="#carousel-example-generic" data-slide-to="{{$key}}" {{if $key eq 0}}class="active"{{/if}}></li>
        {{/if}}
        {{/foreach}}
        {{/if}}
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        {{if !empty($banner_list)}}
        {{foreach $banner_list as $key => $banner}}
        {{if !empty($banner['images_url'])}}
        <div {{if $key eq 0}}class="item active" {{else
        /}}class="item"{{/if}} {{if !empty($banner['bg_color'])}}style="background: {{$banner.bg_color}};"{{/if}} title="{{$banner.name}}">
        {{switch banner.event_type}}
        {{case 3}}
        <!-- 地图 -->
        <a href="javascript:;" {{if !empty($banner['event_value_data']) and !empty($banner['event_value_data'][2]) and !empty($banner['event_value_data'][3])}}class="submit-map-popup" data-lng="{{$banner['event_value_data'][2]}}" data-lat="{{$banner['event_value_data'][3]}}"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" style="height: auto;max-height: 800px"/></a>
        {{/case}}
        {{case 4}}
        <!-- 电话 -->
        <a {{if !empty($banner['event_value'])}}href="tel:{{$banner.event_value}}"{{else /}}href="javascript:;"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" style="height: auto;max-height: 800px"/></a>
        {{/case}}
        {{default /}}
        <!-- 默认url地址 -->
        <a {{if !empty($banner['event_value'])}}href="{{$banner.event_value}}" target="_blank"{{else /}}href="javascript:;"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" class="img-responsive" style="height: auto;max-height: 800px"/></a>
        {{/switch}}
        <div class="carousel-caption">

        </div>
    </div>
    {{/if}}
    {{/foreach}}
    {{/if}}
</div>

<!-- Controls -->
<a class="left carousel-control " href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control " href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
</a>


</div>